package com.meituan.catering.management.product.biz.model.converter;

import com.meituan.catering.management.product.api.http.model.request.DisableProductHttpRequest;
import com.meituan.catering.management.product.biz.model.request.DisableProductBizRequest;

import java.util.Objects;

/**
 * @author Believe
 * Date 2022/5/23 18:49
 */
public class DisableProductBizRequestConverter {
    public static DisableProductBizRequest toDisableProductBizRequest(DisableProductHttpRequest request) {
        if (Objects.isNull(request)) {
            return null;
        }
        DisableProductBizRequest disableProductBizRequest = new DisableProductBizRequest();
        disableProductBizRequest.setEnabled(0);
        disableProductBizRequest.setVersion(request.getVersion());
        return disableProductBizRequest;
    }
}
